package org.faradel.pharmapp.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.stereotype.Component;

/**
 * The persistent class for the MedicationInventory database table.
 * 
 */
@Entity
@Table(name = "MedicationInventory")
@Component("medicationInventory")
public class MedicationInventory implements Serializable
{
    private static final long serialVersionUID = 1L;

    @Id
    private int medication_Id;

    @Column(name = "actual_price_sold")
    private BigDecimal actualPriceSold;

    @Column(name = "available_quantity")
    private int availableQuantity;

    @Column(name = "cost_price")
    private BigDecimal costPrice;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "last_modified")
    private Date lastModified;

    @Column(name = "max_quantity")
    private int maxQuantity;

    @Column(name = "reorder_quantity")
    private int reorderQuantity;

    @Column(name = "reserved_quantity")
    private int reservedQuantity;

    @Column(name = "sell_price")
    private BigDecimal sellPrice;

    @Column(name = "supply_box_quantity")
    private int supplyBoxQuantity;

    // bi-directional one-to-one association to Medication
    @OneToOne
    @JoinColumn(name = "Medication_Id")
    private Medication medication;

    // bi-directional many-to-one association to Supplier
    @ManyToOne
    @JoinColumn(name = "supplier_id")
    private Supplier supplier;

    // bi-directional many-to-one association to PharmaUser
    @ManyToOne
    @JoinColumn(name = "user_last_modified")
    private PharmaUser pharmaUser;

    @Column(name = "order_status")
    private String orderStatus;

    public String getOrderStatus()
    {
        return orderStatus;
    }

    public void setOrderStatus(String order_status)
    {
        this.orderStatus = order_status;
    }

    public MedicationInventory()
    {
    }

    public int getMedication_Id()
    {
        return this.medication_Id;
    }

    public void setMedication_Id(int medication_Id)
    {
        this.medication_Id = medication_Id;
    }

    public BigDecimal getActualPriceSold()
    {
        return this.actualPriceSold;
    }

    public void setActualPriceSold(BigDecimal actualPriceSold)
    {
        this.actualPriceSold = actualPriceSold;
    }

    public int getAvailableQuantity()
    {
        return this.availableQuantity;
    }

    public void setAvailableQuantity(int availableQuantity)
    {
        this.availableQuantity = availableQuantity;
    }

    public BigDecimal getCostPrice()
    {
        return this.costPrice;
    }

    public void setCostPrice(BigDecimal costPrice)
    {
        this.costPrice = costPrice;
    }

    public Date getLastModified()
    {
        return this.lastModified;
    }

    public void setLastModified(Date lastModified)
    {
        this.lastModified = lastModified;
    }

    public int getMaxQuantity()
    {
        return this.maxQuantity;
    }

    public void setMaxQuantity(int maxQuantity)
    {
        this.maxQuantity = maxQuantity;
    }

    public int getReorderQuantity()
    {
        return this.reorderQuantity;
    }

    public void setReorderQuantity(int reorderQuantity)
    {
        this.reorderQuantity = reorderQuantity;
    }

    public int getReservedQuantity()
    {
        return this.reservedQuantity;
    }

    public void setReservedQuantity(int reservedQuantity)
    {
        this.reservedQuantity = reservedQuantity;
    }

    public BigDecimal getSellPrice()
    {
        return this.sellPrice;
    }

    public void setSellPrice(BigDecimal sellPrice)
    {
        this.sellPrice = sellPrice;
    }

    public int getSupplyBoxQuantity()
    {
        return this.supplyBoxQuantity;
    }

    public void setSupplyBoxQuantity(int supplyBoxQuantity)
    {
        this.supplyBoxQuantity = supplyBoxQuantity;
    }

    public Medication getMedication()
    {
        return this.medication;
    }

    public void setMedication(Medication medication)
    {
        this.medication = medication;
    }

    public Supplier getSupplier()
    {
        return this.supplier;
    }

    public void setSupplier(Supplier supplier)
    {
        this.supplier = supplier;
    }

    public PharmaUser getPharmaUser()
    {
        return this.pharmaUser;
    }

    public void setPharmaUser(PharmaUser pharmaUser)
    {
        this.pharmaUser = pharmaUser;
    }

}